-- GENERATED SPELL FOR [Twilight Apostle] --


function spell0_30179(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(28902,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30179', 10336, 1)
end

function spell1_30179(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_30179', 3000, 1)
end

function spell2_30179(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(61570,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30179', 600, 1)
end

function spell3_30179(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30179', 0, 1)
end

function Sorts_30179(pUnit, Event)
local choix_sorts_30179 = math.random(0, 3)
if choix_sorts_30179 == 0 then
pUnit:RegisterEvent('spell0_30179', 1, 1)
end
if choix_sorts_30179 == 1 then
pUnit:RegisterEvent('spell1_30179', 1, 1)
end
if choix_sorts_30179 == 2 then
pUnit:RegisterEvent('spell2_30179', 1, 1)
end
if choix_sorts_30179 == 3 then
pUnit:RegisterEvent('spell3_30179', 1, 1)
end
end

function mob30179_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30179', math.random(1500, 3000), 1)
end

function mob30179_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30179_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30179_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30179, 1, 'mob30179_Action')
RegisterUnitEvent(30179, 2, 'mob30179_Leave')
RegisterUnitEvent(30179, 3, 'mob30179_Kill')
RegisterUnitEvent(30179, 4, 'mob30179_Die')
